package com.itqf.controller;

import com.itqf.entity.Account;
import com.itqf.service.AccountService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;
import java.util.List;

/**
 * @Description:
 * @Company: 千锋互联
 * @Author: 李丽婷
 * @Date: 2021/1/26
 * @Time: 下午5:02
 */
@Controller
public class MyController {

    /**
     * spring容器  父容器
     * springmvc容器  子容器  直接访问父容器的内容
     */
    @Resource
    AccountService accountService;

    @RequestMapping("/findAll")
    @ResponseBody
    public List<Account> find(){
        return  accountService.find();
    }


}
